#include <iostream>
#include <string.h>
#include <stdio.h>
using namespace std;
char* reverseStr(char* str);
int main ()
{
    char a[] = {'l','o','v','e','\0'};
    reverseStr(a);
    cout<<a<<endl;
}

char* reverseStr(char* str)
{
    if(NULL == str)return str;
    int start = 0;
    int end = strlen(str)-1;
    while(start < end) {
        //swap
        str[start] ^= str[end];
        str[end] ^= str[start];
        str[start] ^= str[end];
        ++start;
        --end;
    }
    return str;
}
